package se3a04.mcmapster;

import java.util.ArrayList;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class huntRegistration extends ListActivity{
	
	static String[] huntList;
	String username;
	static ArrayList<String> registeredList = new ArrayList<String>();
	static int index;
	static String huntName;
	
	@Override
	protected void onCreate(Bundle huntRegistrationState) {

		getHuntList();
		super.onCreate(huntRegistrationState);
		setListAdapter(new ArrayAdapter<String>(huntRegistration.this, android.R.layout.simple_list_item_1, huntList));
	}
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		index = position;
		huntName = huntList[position];
		super.onListItemClick(l, v, position, id);
		Intent displayHuntInfo = new Intent("se3a04.mcmapster.DISPLAYHUNTINFO");
		startActivity(displayHuntInfo);
		
	}
	
	public static void getHuntList() {
		
		String tempHuntList = "asdf;fdsa;qwer;rewq;";
		//String tempHuntList = LocalDB.getHuntList();
		huntList = tempHuntList.split(";");
	}
}
